package com.globallogic.vkulyk.SSHTool;

public class FileCopyDataKeeper extends ActionDataKeeper {

	private String srcFile = "";
	private String dstDir = "";

	public FileCopyDataKeeper(String type, String user, String password, String srcFile, String dstDir) {
		super(type, user, password);
		this.srcFile = srcFile;
		this.dstDir = dstDir;
	}

	public String getSrcFile() {
		return srcFile;
	}

	public String getDstDir() {
		return dstDir;
	}
	
	@Override
	public int hashCode() {
		return super.hashCode() + srcFile.hashCode() + dstDir.hashCode();
	}

	@Override
	public boolean equals(Object thatObj) {
		if (this == thatObj) return true;
		return thatObj instanceof FileCopyDataKeeper
				&& super.equals(thatObj)
				&& srcFile.equals(((FileCopyDataKeeper) thatObj).getSrcFile())
				&& dstDir.equals(((FileCopyDataKeeper) thatObj).getDstDir());
	}
	
	@Override
	public String toString() {
		return  super.toString() + " " + srcFile + " " + dstDir;
	}
}
